import { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Login',
    component: () => import('@/views/Public/Login.vue'),
    meta: { title: "登录", isNeedToken: false, },
  },
  {
    path: "/Home",
    component: () => import('@/views/Home.vue'),
    meta: { title: "主页", isNeedToken: true },
    children: [
      {
        path: "",
        meta: { isNeedToken: true },
        redirect: {
          path: "User"
        }
      },
      {
        path: "User",
        component: () => import('@/views/User/Container.vue'),
        meta: { title: "用户管理", icon: "team", isNeedToken: true },
        children: [
          {
            path: "",
            meta: { isNeedToken: true },
            redirect: {
              path: "List"
            }
          },
          {
            path: "List",
            component: () => import('@/views/User/List.vue'),
            meta: { title: "用户列表", isNeedToken: true },
          },
        ]
      },
    ]
  }
]

export default routes
